using System;

namespace Me.Prettyprint.Hector.Api.Locking
{
	public class HLockManagerConfigurator
	{
        public const System.String DEFAUT_LOCK_MANAGER_CF = "HLocks";
        private const System.String DEFAULT_LOCK_MANAGER_KEYSPACE_NAME = "HLockingManager";

        public HLockManagerConfigurator()
        {
            KeyspaceName = DEFAULT_LOCK_MANAGER_KEYSPACE_NAME;
            LockManagerCF = DEFAUT_LOCK_MANAGER_CF;
            RowsCacheEnabled = true;
            LocksTTLInMillis = 5000L;
            BackOffRetryDelayInMillis = 100L;
            ReplicationFactor = 3;
            NumberOfLockObserverThreads = 1;
            MaxSelectSize = 10;
        }
        virtual public string LockManagerCF
		{
			get;
			set;
		}
		virtual public bool RowsCacheEnabled
		{
			get;
			set;
		}
		virtual public long LocksTTLInMillis
		{
			get;
			set;
		}
		virtual public long BackOffRetryDelayInMillis
		{
			get;
			set;
		}
		virtual public string KeyspaceName
		{
			get;
			set;
		}
		virtual public int ReplicationFactor
		{
			get;
			set;
		}
		virtual public int NumberOfLockObserverThreads
		{
			get;
			set;
		}
		virtual public int MaxSelectSize
		{
			get;
			set;
		}
		public override string ToString()
		{
			return "HLockManagerConfigurator [keyspaceName=" + 
                KeyspaceName + ", lockManagerCF=" + 
                LockManagerCF + ", rowsCacheEnabled=" + 
                RowsCacheEnabled + ", locksTTLInMillis=" + 
                LocksTTLInMillis + ", backOffRetryDelayInMillis=" + 
                BackOffRetryDelayInMillis + ", replicationFactor=" + 
                ReplicationFactor + ", numberOfLockObserverThreads=" + 
                NumberOfLockObserverThreads + ", maxSelectSize=" + 
                MaxSelectSize + "]";
		}
	}
}